package com.woniuxy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.entity.Address;
import com.woniuxy.mapper.AddressMapper;
import com.woniuxy.service.AddressService;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AddressServiceImpl extends ServiceImpl<AddressMapper, Address> implements AddressService {
    @Override
    public List<Address> queryByParentCodes(String asList) {
        LambdaQueryWrapper<Address> wrapper = Wrappers.lambdaQuery(Address.class);
        wrapper.eq(Address::getParentCode,asList);
        List<Address> addressList = baseMapper.selectList(wrapper);
        return addressList;
    }
}
